package com.cysyz.mylib.dao.engine;


import java.io.Serializable;
import java.util.List;

public interface PersistenceEngine {
	public void persist(Object entity);

	public void remove(Object entity);
	
	@SuppressWarnings("rawtypes")
	public void removeByCollection(List list);
	
	public void merge(Object entity);

	public <T> T find(Class<T> entityClass, Serializable entityID);

	public <T> T getReference(Class<T> entityClass, Serializable entityID);

	public Query createQuery(String ql);
	
	public SQLQuery createSQLQuery(String sql);
	
	public SQLQuery TranslateToCountSQL(Query queryForData);
	public SQLQuery TranslateToCountSQL(String hql);
}
